<!DOCTYPE html>
<html lang="zh-cn">
    <head>
        <title></title>
        <meta charset="UTF-8">
        <meta name="viewport" content="width=device-width, initial-scale=1">
        <script src="https://unpkg.com/vue/dist/vue.js"></script>
    </head>
    <body>
        <div id="app1">
            <comp_test>111</comp_test>
            <comp_btn></comp_btn>
            <comp_btn></comp_btn>
            <comp_btn></comp_btn>
        </div>
        <script>
            Vue.component('comp_test',{
                template:'<div>我的第一个组件</div>'
            });
            var data={count:0};
            Vue.component('comp_btn',{
                template:'<button v-on:click="count++">{{count}}</button>',
                data:function(){
                    return{
                        count:0
                    };
                }
            })
            var vm=new Vue({
                el:'#app1',
                data:{
                    
                }
            });
        </script>
    </body>
</html>